// export const baseUrl = "https://127.0.0.1:8000"

export const baseUrl = "https://www.zyntm.com:8000"

export interface resOption {
    url: string,
    method: 'GET' | 'POST' | "OPTIONS" | "PUT" | "DELETE",
    data?: any | null,
    token: boolean | null,
}

export interface FileVo {
	url: string,
	fileType: string,
	isVideo: boolean
}


const requestBef = () => {

}

export const request = (option:resOption) => {
	requestBef()
    //@ts-ignore
    return uni.request({
        url: baseUrl + option.url,
        method: option.method,
        data: option.data,
        header: {
            //@ts-ignore
            "token": option.token ? uni.getStorageSync("token") : ""
        }
    })
}